Learn R Programming

ghyp (version 0.9.3)

ghyp moment computation: Compute moments of ghyp distributions

Description

This function computes moments of arbitrary orders of the univariate generalized hyperbolic distribution.

Usage

ghyp.moment(object, order = 3:4, absolute = FALSE, central = TRUE, ...)

Arguments

object
An object inheriting from class ghypuv.
order
A vector containing the order of the moments.
absolute
Indicate whether the absolute value is taken or not. Must be TRUE if order is not integer.
central
If TRUE the moment about the expected value is computed.
...
Arguments passed to integrate.

Value

  • A vector which contains the moments.

See Also

mean, vcov, Egig

Examples

Run this code
nig.uv <- NIG(alpha.bar=0.1, mu=1.1, sigma=3, gamma=-2)
  # Moments of integer order
  ghyp.moment(nig.uv, order = 1:6)
  # Moments of fractional order  
  ghyp.moment(nig.uv, order = 0.2 * 1:20, absolute = TRUE)

Run the code above in your browser using DataLab